<?php
class stFacebookCoupon_model extends stmodel_2_1{

    public function __construct($config) {
        parent::__construct ( $config );
        $this->setTableName('st_coupons');
        $this->setPrimaryKey('CouponID');
    }
    public function getuser($id){

        return $this->get_var("SELECT Name FROM st_coupon_users WHERE CouponUserID = ".$id);
    }
    public function getFacebook($id){
        return $this->get_var("SELECT FacebookUserID FROM st_coupon_users WHERE CouponUserID = ".$id);
    }
    public function gettemplate($id){
        return $this->get_var("SELECT CouponTemplateName  FROM st_coupon_templates WHERE CouponTemplateID = ".$id);
    }

    


}